From: Camila Ayres Date: Tue, 10 Dec 2024 17:30:15 +0000 (+0100) Subject: Do not display any notification when import was successful, only log it. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~30^2^2~196^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b095670635ea380e621ca15a12b10340a7330e4d;p=nextcloud-desktop.git Do not display any notification when import was successful, only log it. Signed-off-by: Camila Ayres --- diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 4b2f600af..1bf8cffea 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -484,23 +484,31 @@ void Application::setupAccountsAndFolders() if (const auto accounts = AccountManager::instance()->accounts(); accountsRestoreResult == AccountManager::AccountsRestoreSuccessFromLegacyVersion && !accounts.isEmpty()) { + const auto accountsListSize = accounts.size(); - const auto accountsRestoreMessage = accountsListSize > 1 - ? tr("%1 accounts", "number of accounts imported").arg(QString::number(accountsListSize)) - : tr("1 account"); - const auto foldersRestoreMessage = foldersListSize > 1 - ? tr("%1 folders", "number of folders imported").arg(QString::number(foldersListSize)) - : tr("1 folder"); - const auto messageBox = new QMessageBox(QMessageBox::Information, - tr("Legacy import"), - tr("Imported %1 and %2 from a legacy desktop client.\n%3", - "number of accounts and folders imported. list of users.") - .arg(accountsRestoreMessage, - foldersRestoreMessage, - prettyNamesList(accounts)) - ); - messageBox->setWindowModality(Qt::NonModal); - messageBox->open(); + if (Theme::instance()->displayLegacyImportDialog()) { + const auto accountsRestoreMessage = accountsListSize > 1 + ? tr("%1 accounts", "number of accounts imported").arg(QString::number(accountsListSize)) + : tr("1 account"); + const auto foldersRestoreMessage = foldersListSize > 1 + ? tr("%1 folders", "number of folders imported").arg(QString::number(foldersListSize)) + : tr("1 folder"); + const auto messageBox = new QMessageBox(QMessageBox::Information, + tr("Legacy import"), + tr("Imported %1 and %2 from a legacy desktop client.\n%3", + "number of accounts and folders imported. list of users.") + .arg(accountsRestoreMessage, + foldersRestoreMessage, + prettyNamesList(accounts)) + ); + messageBox->setWindowModality(Qt::NonModal); + messageBox->open(); + } + + qCWarning(lcApplication) << "Migration result AccountManager::AccountsRestoreResult:" << accountsRestoreResult; + qCWarning(lcApplication) << "Folders migrated: " << foldersListSize; + qCWarning(lcApplication) << accountsListSize << "account(s) were migrated:" << prettyNamesList(accounts); + } else { qCWarning(lcApplication) << "Migration result AccountManager::AccountsRestoreResult: " << accountsRestoreResult; qCWarning(lcApplication) << "Folders migrated: " << foldersListSize;